package com.atguigu.memento2;

/**
 * QQ信息(发起人)
 */
public class OriginatorForUserInfo {
	
	/** QQ号码 */
	private String qqNumber;
	
	/** 昵称*/
	private String nickname;
	
	/** 头像照片 */
	private String pic;

	public String getQqNumber() {
		return qqNumber;
	}

	public void setQqNumber(String qqNumber) {
		this.qqNumber = qqNumber;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	/**
	 * 保存备忘录
	 * 
	 * @return 返回一个新的备忘录对象
	 */
	public Memento createMemento() {
		return new Memento(nickname, pic);
	}

	/**
	 * 恢复备忘录对象
	 */
	public void restoreMemento(Memento memento) {
		this.nickname = memento.getNickname();
		this.pic = memento.getPic();
	}

	/**
	 * 显示用户信息
	 */
	public void show() {
		System.out.println("qqNumber:" + qqNumber);
		System.out.println("nickname:" + nickname);
		System.out.println("pic:" + pic);
	}
}
